<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/mock.js"></script>
	</head>
	<body>
		<script type="text/javascript">
			let m1 = Mock.mock({
				'name|2-5': 'zhangsan',
				'age|+1': 20
			});
			// console.log(m1);
			let tpl = {
				'list|5': [{
					'name': '@cname()',
					'age|+1': 20,
					'score|60-100': 1,
					'salary|1000-10000.2': 1,
					'star|1-5': '☆',
					'email': '@email()',
					'birthday': '@datetime()',
					'city': '@county(true)',
					'cfirst': '@cfirst()',
					'clast': '@clast()'

				}]
			}
			// let data = Mock.mock(tpl);
			// console.log(data);
			// console.log(JSON.stringify(data))

			let sku = {
				'list|10': [{
					'cartId': '@id()',
					'skuId|+1': 1,
					'price': '@float(1000, 10000, 2, 2)',
					'num|1-10': 1,
					'paymode|0-1': 1,
					'createTime': '@datetime()'
				}]
			}

			let data = Mock.mock(sku);

			console.log(data);

			console.log(JSON.stringify(data))
		</script>
	</body>
</html>
